import Vue from 'vue'
import Vuex from 'vuex'
import home from './home.js'
import user from './user.js'
import search from './search.js'
import detail from './detail.js'
import shopcart from './shopcart.js'
import trade from '@/store/trade.js'

Vue.use(Vuex)

const state = {
    name: 'vans'
}
const mutations = {}
const actions = {}
const getters = {}

export default new Vuex.Store({
    state,
    mutations,
    actions,
    getters,
    // 模块化
    modules: {
        home,
        user,
        search,
        detail,
        shopcart,
        trade,
    }
})